<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.org/schema/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.org/ui" template="layout/template.xhtml">
	<ui:define name="body">
		<h:form>
			<p:panel header="会议室信息">
				<h:panelGrid width="400" columns="2" cellpadding="3">
					<p:outputLabel for="mrName">会议室名称</p:outputLabel>
					<h:inputText id="mrName" value="#{meetingRoom.mrName}" />
					<p:outputLabel for="mrType">会议室类型</p:outputLabel>
					<h:inputText id="mrType" value="#{meetingRoom.mrType}" />
					<p:outputLabel for="mrAddr">会议室地址</p:outputLabel>
					<h:inputText id="mrAddr" value="#{meetingRoom.mrAddr}" />
					<p:outputLabel for="mrSize">可容纳人数</p:outputLabel>
					<h:inputText id="mrSize" value="#{meetingRoom.mrSize}" />
					<p:column>
						<p:outputLabel for="mrMemo">备注</p:outputLabel>
					</p:column>
					<p:column>
						<p:inputTextarea id="mrMemo" value="#{meetingRoom.mrMemo}"
							rows="5" cols="30" counter="counter" maxlength="100"
							counterTemplate="{0} characters remaining." autoResize="false" />
						<br />
						<h:outputText id="counter" />
					</p:column>
					<!-- 
					<p:column colspan="2">
						<h:outputText value="*" style="color:red;" /> required fields
                    </p:column>
                     -->
				</h:panelGrid>
			</p:panel>

			<h:commandButton value="追加" action="#{meetingRoomAction.create}"
				rendered="#{meetingRoom.mrId==null}" />
			<h:commandButton value="修正" action="#{meetingRoomAction.update}"
				rendered="#{meetingRoom.mrId!=null}" />
			<h:commandButton value="删除" action="#{meetingRoomAction.deleteView}"
				rendered="#{meetingRoom.mrId!=null}" />
			<h:commandButton value="取消" action="cancel" />
			<!-- 
			<s:link view="/meetingRoomDetail.xhtml" propagation="begin"
				rendered="#{meetingRoom.mrId!=null}">
				<f:param name="mrId" value="#{meetingRoom.mrId}" />
				<f:param name="delFlg" value="#{true}" />
				<p:button value="删除" />
			</s:link> 
			-->

			<!-- 
			<s:link view="/meetingRoomBookingEdit.xhtml" propagation="begin"
				rendered="#{meetingRoom.mrId!=null}">
				<f:param name="mrId" value="#{meetingRoom.mrId}" />
				<p:button value="预约" />
			</s:link>
             -->
		</h:form>
	</ui:define>
</ui:composition>
